@extends('admin.layout.base')
@section('title', '订单列表页')

@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>订单管理</h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">商品管理</a></li>
                <li class="active">订单管理</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-header with-border">
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            {{--<form name="fm" method="post" action="{{ url("/admin/admin") }}">--}}
                                <p>
                                <form action="{{ url('/admin/order') }}" method="post">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}" />
                                    <input type="text" name="keyword" placeholder="请输入" value="{{$keyword}}"
                                           class="gssb slider form-control" data-slider-min="-200" data-slider-max="200"
                                           data-slider-step="5" data-slider-value="[-100,100]"
                                           data-slider-orientation="vertical" data-slider-selection="before"
                                           data-slider-tooltip="show" data-slider-id="red"
                                           style="width: 200px;">
                                    <input type="submit" class="btn btn-block btn-primary" id="gssa" value="搜索"style="width: 50px; float: left; margin-top: -34px; margin-left: 200px"/>
                                </form>
                                </p>
                            {{--</form>--}}
                            <table class="table table-bordered gssc">
                                <tr>
                                    <th class="jz">订单编号</th>
                                    <th class="jz">收货人</th>
                                    <th class="jz">联系方式</th>
                                    <th class="jz">邮编</th>
                                    <th class="jz">收货地址</th>
                                    <th class="jz">订单金额</th>
                                    {{--<th class="jz">订单状态</th>--}}
                                    <th class="jz">下单时间</th>
                                    <th class="jz">操作</th>
                                </tr>
                                @foreach($orders as $order)
                                <tr>
                                    <td class="jz">{{ $order->order_number }}</td>
                                    <td class="jz">{{ $order->order_name }}</td>
                                    <td class="jz">{{ $order->order_tel }}</td>
                                    <td class="jz">{{ $order->order_code }}</td>
                                    <td class="jz">{{ $order->order_address }}</td>
                                    <td class="jz">{{ $order->order_total }}</td>
                                    {{--<td class="jz">--}}
                                        {{--@if ($s->order_status == 1 )--}}
                                            {{--待发货--}}
                                        {{--@elseif ($s->order_status == 0 )--}}
                                            {{--待付款--}}
                                        {{--@elseif  ($s->order_status == 2 )--}}
                                            {{--待收货--}}
                                        {{--@elseif  ($s->order_status == 3 )--}}
                                            {{--待评价--}}
                                        {{--@elseif  ($s->order_status == 4 )--}}
                                            {{--已评价--}}
                                        {{--@elseif  ($s->order_status == 5 )--}}
                                            {{--退货申请--}}
                                        {{--@elseif  ($s->order_status == 6 )--}}
                                            {{--换货申请--}}
                                        {{--@elseif  ($s->order_status == 7 )--}}
                                            {{--已退货--}}
                                        {{--@elseif  ($s->order_status == -1 )--}}
                                            {{--取消订单--}}
                                        {{--@endif--}}
                                    {{--</td>--}}
                                    <td class="jz">{{ $order->order_paytime }}</td>
                                    <td>
{{--                                        <a href="{{url('/admin/order/detail')}}" type="button" class="btn btn-info ckspxq">查看商品详情</a>--}}
                                        <a href="{{url('/admin/order/xiugai',[$order->id])}}" type="button" class="btn btn-info xg">查看详情并修改</a>
                                    </td>
                                    {{--<td><a href="" />编辑</a> <a href="" />修改</a></td>--}}
                                </tr>
                                @endforeach
                                {{--@endforeach--}}
                            </table>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer clearfix">
                            <ul class="pagination pagination-sm no-margin pull-right">
                                {!! $orders->appends(["keyword" => $keyword])->render() !!}
                            </ul>
                            {{--{!! $users->appends(["keyword" => $keyword])->render() !!}--}}
                        </div>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
    @endsection
    @section('pluginscript')
            <!-- Slimscroll -->
    <script src="{{ asset('/dist/admin/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
    <!-- FastClick -->
    <script src="{{ asset('/dist/admin/plugins/fastclick/fastclick.js') }}"></script>
@endsection